import 'package:dailoz/generated/json/base/json_convert_content.dart';
import 'package:dailoz/entity/task_entity.dart';

TaskEntity $TaskEntityFromJson(Map<String, dynamic> json) {
  final TaskEntity taskEntity = TaskEntity();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    taskEntity.id = id;
  }
  final String? startTime = jsonConvert.convert<String>(json['startTime']);
  if (startTime != null) {
    taskEntity.startTime = startTime;
  }
  final String? endTime = jsonConvert.convert<String>(json['endTime']);
  if (endTime != null) {
    taskEntity.endTime = endTime;
  }
  final String? taskContent = jsonConvert.convert<String>(json['taskContent']);
  if (taskContent != null) {
    taskEntity.taskContent = taskContent;
  }
  final int? status = jsonConvert.convert<int>(json['status']);
  if (status != null) {
    taskEntity.status = status;
  }
  final String? type = jsonConvert.convert<String>(json['type']);
  if (type != null) {
    taskEntity.type = type;
  }
  final String? description = jsonConvert.convert<String>(json['description']);
  if (description != null) {
    taskEntity.description = description;
  }
  final List<String>? tagList =
      jsonConvert.convertListNotNull<String>(json['tagList']);
  if (tagList != null) {
    taskEntity.tagList = tagList;
  }
  final String? tag = jsonConvert.convert<String>(json['tag']);
  if (tag != null) {
    taskEntity.tag = tag;
  }
  return taskEntity;
}

Map<String, dynamic> $TaskEntityToJson(TaskEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['startTime'] = entity.startTime;
  data['endTime'] = entity.endTime;
  data['taskContent'] = entity.taskContent;
  data['status'] = entity.status;
  data['type'] = entity.type;
  data['description'] = entity.description;
  data['tagList'] = entity.tagList;
  data['tag'] = entity.tag;
  return data;
}
